博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在一个页面加载另一个渲染的页面
阅读量:6938 次
发布时间:2019-06-27

本文共 2374 字,大约阅读时间需要 7 分钟。

 
     
     
       
           
       
     
 

@RequestMapping(value = "similarProduct.json", method = RequestMethod.POST) public String getSimilarProduct(HttpServletRequest request,                                 ModelMap model,                                 @RequestParam(value = "maxResult") int maxResult,                                 @RequestParam(value = "pageNo") int pageNo,                                 @RequestParam(value = "productId", defaultValue = "0") long productId,                                 HttpSession session) {
   Locale currentLocale = getRequestLanguage(session, request);    ProductJsons productJsons = null;    productJsons = extendProductService.moreLikeTag(productId, maxResult, currentLocale.toString());    if (productJsons != null) {
       if (productJsons.getProductJsonList() != null) {
           ArrayList
ids = new ArrayList<>();            for (ProductJson productJson : productJsons.getProductJsonList()) {
               ids.add(productJson.getId());            }            model.addAttribute("ratingMap", getAverageRatingById(ids));            model.addAttribute("checkWish", checkWishById(ids));            model.addAttribute("productJsons", productJsons);        }    }    return "moreLikeThis"; }

moreLikeThis.jsp

<%@ page language="java" pageEncoding="UTF-8" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 
 
 
     
       
     
 
本文转自wiwi博客51CTO博客,原文链接http://blog.51cto.com/wiwili/1968589如需转载请自行联系原作者
wiwili
你可能感兴趣的文章
用户数据文件损坏
查看>>
linux使用FIO测试磁盘的iops
查看>>
As3多线程
查看>>
CentOS6.2编译安装MySQL5.5.25
查看>>
Nyoj 星际之门(一)(Cayley定理)
查看>>
词法分析程序
查看>>
Mybatis 动态sql
查看>>
前端基础之css
查看>>
HTML标签权重分值排列
查看>>
sqlserver 2008手工修改表结构,表不能保存的问题与解决方法
查看>>
网址收藏
查看>>
Gtest:Using visual studio 2017 cross platform feature to compile code remotely
查看>>
Android Span的简单使用
查看>>
Aggressive cows 二分不仅仅是查找
查看>>
人的成长,注定是一场孤独的旅途 ...(360doc)
查看>>
iOS开发UI基础—手写控件,frame,center和bounds属性
查看>>
死锁排查的小窍门 --使用jdk自带管理工具jstack
查看>>
unity3d 动态添加地面贴图 草地
查看>>
P1101 单词方阵
查看>>
安卓开发者必备的42个链接
查看>>